package ZooManagement;

/**
 * Animal
 * @author ashongtical
 */
public class Animal {

    public String name;      // animals' name
    public String species;   // animals' species
    public int age;          // animals' age

    // Constructor
    /**
     * Constructor for the Animal class.
     * Initializes the animal with its name, species, and age.
     *
     * @param name    The name of the animal
     * @param species The species of the animal
     * @param age     The age of the animal
     */
    public Animal(String name, String species, int age) {
        this.name = name;
        this.species = species;
        this.age = age;
    }

    /**
     * Gets the name of the animal.
     *
     * @return The name of the animal
     */
    public String getName() {
        return name;
    }

    /**
     * Sets the name of the animal.
     *
     * @param name The name to be set for the animal
     */
    public void setName(String name) {
        this.name = name;
    }

    public String getSpecies() {
        return species;
    }

    /**
     * Sets the species of the animal.
     *
     * @param species The species to be set for the animal
     */
    public void setSpecies(String species) {
        this.species = species;
    }

    /**
     * Gets the age of the animal.
     *
     * @return The age of the animal
     */
    public int getAge() {
        return age;
    }

    /**
     * Sets the age of the animal.
     *
     * @param age The age to be set for the animal
     */
    public void setAge(int age) {
        this.age = age;
    }

    /**
     * Displays the details of the animal.
     * Prints the name, species, and age of the animal to the console.
     */
    public void display() {
        System.out.println("Name: " + name + ", Species: " + species + ", Age: " + age);
    }
}